API Help
EPLAN API / API Reference / Actions / translate
In This Topic
    translate
    In This Topic
    Action class for translate functions: translate a project, export missing translation list, and remove languages from a project.
    

    Parameter Description

    TYPE

    Type of task to be performed by the action:
    TRANSLATEPROJECT: Translate project
    TRANSLATEPAGES: Translate given pages
    REMOVELANGUAGE: Remove language entry
    EXPORTMISSINGTRANSLATIONS: Export missing-word list
    IMPORTTOTRANSDB: Import database texts
    EXPORTFROMTRANSDB: Export database texts
    

    PROJECTNAME

    Project name with full path (optional).
    If not entered, the selected project is used when the action is called from GUI (like from a script or button bar). 
    If called from the windows command line, PROJECTNAME must be set or the  must be used first, otherwise an  exception is thrown. 
    

    IMPORTFILE

    Name of the file with texts to import. Only applies to the parameter TYPE equal to IMPORTTOTRANSDB
    

    EXPORTFILE

    Name of file containing exported missing word list. 
    This parameter is only effective with the TYPE equal to EXPORTMISSINGTRANSLATIONS or EXPORTFROMTRANSDB
    

    CONVERTER

    Name of converter (optional). This name is used as the input and output format.
    Default values:"XTrLanguageDbXmlConverterImpl" 
    (Native format XML) for TYPE equal to EXPORTFROMTRANSDB, XTrLanguageDbXml2TabConverterImpl for IMPORTTOTRANSDB and EXPORTMISSINGTRANSLATIONS
    This parameter is only effective with the TYPE equal to EXPORTMISSINGTRANSLATIONS, IMPORTTOTRANSDB or EXPORTFROMTRANSDB
    

    LANGUAGE

    Translation language, e.g., fr_FR
    Only applies to the parameter: REMOVELANGUAGEEXPORTMISSINGTRANSLATIONS
    

    USEPAGEFILTER

    Determines if only filtered pages should be used or all project pages (optional). It corresponds to "Active" check box in GUI. 
    These parameters are only effective with the TRANSLATEPAGES value of the TYPE parameter.
    Default value: 0 
    

    PAGFILTERNAME

    Pages are read from pagefilter with the name pagefiltername.These parameters are only effective with the TRANSLATEPAGES value of the TYPE parameter.
    

    PAGENAME

    Name of the page to be translated (optional).
    

    PAGENAMEn

    Names of the pages to be translated (optional), where n is a number e.g. /PAGENAME1:=AP+ST1/2 /PAGENAME2:=AP+ST1/4 /PAGENAME3:=AP+ST1/7 etc. 
    These parameters are only effective with the TRANSLATEPAGES value of the TYPE parameter.
    

    SELn

    Identifier of the pages to be translated (optional), where n is a number (e.g. /SEL1:38/4/12/0 (result from StorableObject.ToStringIdentifier())) 
    parameters are only effective with the TRANSLATEPAGES value of the TYPE parameter.
    

    Remarks
    The main language of a project cannot be removed from it. 
    If several languages are to be removed from the project, they must be entered individually, separated by comma, e.g., /LANGUAGE:en_US,fr_FR,da_DK
    

    Example
    Translate project
    
    translate /TYPE:TRANSLATEPROJECT /PROJECTNAME:C:\Projects\EPLAN\ESS_Sample_Project.elk
    
    Import database texts
    
    translate /TYPE:IMPORTTOTRANSDB  /CONVERTER:XTrLanguageDbXmlConverterImpl  /IMPORTFILE:c:\test\TranslationDB_FULL.etd
    
    Remove translation from project:
    
    translate /PROJECTNAME:C:\Projects\EPLAN\ESS_Sample_Project.elk  /TYPE:REMOVELANGUAGE /LANGUAGE:en_US
    
    
    Export missing-word list
    
    translate /TYPE:EXPORTMISSINGTRANSLATIONS /PROJECTNAME:C:\Projects\EPLAN\ESS_Sample_Project.elk /LANGUAGE:en_US /EXPORTFILE:C:\temp\missingTransFile.txt /CONVERTER:XE5LanguageDbXmlConverterImpl